Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Campaigns objectives endpoint #12616

Merged
merged 7 commits into from
Sep 20, 2024

Conversation

irfano
Copy link
Contributor

@irfano irfano commented Sep 14, 2024

Part of: #12469

Description

This adds functions to the BlazeRepository for fetching campaign objectives.
I haven't included unit tests since the newly added functions don't have complex logic and act as a gateway to the FluxC library.

Warning

do not merge: FluxC reference should be updated to the trunk hash before merging.
Known issue: Although the campaigns/objectives endpoint accepts a locale parameter, the response is not localized on the API side.

Steps to reproduce

Fetching objectives is not yet implemented in the UI. The retrieved data can only be viewed using the Database Inspector. To fetch objectives on the Blaze campaign preview screen, apply this patch: Fetch_objectives.patch

  1. Apply the patch.
  2. Build the app.
  3. Tap the "Create campaign" button on the My Store tab.
  4. Select a product.
  5. Open the Database Inspector.

Testing information

The data in the Database inspector should be like this:
Screenshot 2024-09-14 at 15 17 13

The tests that have been performed

I verified the stored data in the BlazeCampaignObjectives table.

  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

Reviewer (or Author, in the case of optional code reviews):

Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement:

  • The PR is small and has a clear, single focus, or a valid explanation is provided in the description. If needed, please request to split it into smaller PRs.
  • Ensure Adequate Unit Test Coverage: The changes are reasonably covered by unit tests or an explanation is provided in the PR description.
  • Manual Testing: The author listed all the tests they ran, including smoke tests when needed (e.g., for refactorings). The reviewer confirmed that the PR works as expected on big (tablet) and small (phone) in case of UI changes, and no regressions are added.

@irfano irfano added type: task An internally driven task. status: do not merge Dependent on another PR, ready for review but not ready for merge. feature: blaze Related to the Blaze project labels Sep 14, 2024
@irfano irfano added this to the 20.5 milestone Sep 14, 2024
@dangermattic
Copy link
Collaborator

dangermattic commented Sep 14, 2024

1 Warning
⚠️ This PR is assigned to the milestone 20.5. The due date for this milestone has already passed.
Please assign it to a milestone with a later deadline or check whether the release for this milestone has already been finished.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Sep 14, 2024

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App Name WooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commite93a0bb
Direct Downloadwoocommerce-wear-prototype-build-pr12616-e93a0bb.apk

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Sep 14, 2024

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App Name WooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commite93a0bb
Direct Downloadwoocommerce-prototype-build-pr12616-e93a0bb.apk

@JorgeMucientes JorgeMucientes self-assigned this Sep 17, 2024
@JorgeMucientes JorgeMucientes force-pushed the issue/12469-campaigns-objectives-endpoint branch from b54f306 to 29424db Compare September 19, 2024 13:38
@JorgeMucientes JorgeMucientes removed the status: do not merge Dependent on another PR, ready for review but not ready for merge. label Sep 20, 2024
@codecov-commenter
Copy link

codecov-commenter commented Sep 20, 2024

Codecov Report

Attention: Patch coverage is 0% with 15 lines in your changes missing coverage. Please review.

Project coverage is 40.63%. Comparing base (692f475) to head (e93a0bb).
Report is 8 commits behind head on trunk.

Files with missing lines Patch % Lines
...om/woocommerce/android/ui/blaze/BlazeRepository.kt 0.00% 15 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##              trunk   #12616      +/-   ##
============================================
- Coverage     40.64%   40.63%   -0.01%     
  Complexity     5673     5673              
============================================
  Files          1230     1230              
  Lines         69167    69182      +15     
  Branches       9579     9580       +1     
============================================
  Hits          28114    28114              
- Misses        38468    38483      +15     
  Partials       2585     2585              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@JorgeMucientes JorgeMucientes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this @irfano. Changes look good and work as expected. Merging!

@JorgeMucientes JorgeMucientes merged commit 525e121 into trunk Sep 20, 2024
16 checks passed
@JorgeMucientes JorgeMucientes deleted the issue/12469-campaigns-objectives-endpoint branch September 20, 2024 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: blaze Related to the Blaze project type: task An internally driven task.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants